xgrid <- seq(0.01, 10, 0.1)
logx <- log(xgrid)
ttheta <- 1
invsinhx<- log(ttheta*xgrid + (ttheta^2*xgrid^2 + 1)^(1/2))/ttheta
invsinhx
length(invsinhx)
simul_data    <- read.csv("data/simul_asset_data_final_Tlong.csv", header = TRUE)
simul_data    <- read.csv("simul_asset_data_final_Tlong.csv", header = TRUE)
pwd()
cd()
```{r}
simul_data    <- read.csv("simul_asset_data_final_Tlong.csv", header = TRUE)
header(simul_data)
head(simul_data)
dim(simul_data)
simul_data    <- read.csv("simul_asset_data_final_Tlong.csv", header = FALSE)
head(simul_data)
simul_data    <- read.csv("simul_asset_data_final_Tlong.csv", header = FALSE)
head(simul_data)
head(simul_data)
View(simul_data)
View(simul_data)
dim(simul_data)
simul_data(1,3)
simul_data[1,3]
simul_data[1,1]
employdraws_data <- read.csv("simul_employ_data_final_Tlong.csv", header = FALSE)
tt=1
densdraws_t = densdraws[,tt]
densdraws    <- read.csv("simul_asset_data_final_Tlong.csv", header = FALSE)
#head(densdraws_data)
employdraws <- read.csv("simul_employ_data_final_Tlong.csv", header = FALSE)
tt=1
densdraws_t = densdraws[,tt]
employdraws_t = employdraws[,tt]
selecteddraws_t = densdraws_t[employdraws_t ==1]
dim(selecteddraws_t)
length(selecteddraws_t)
percentiles_mat[tt,] = quantile(selecteddraws_t, c(.1, .2, .5, .8, .9))
quantile(selecteddraws_t, c(.1, .2, .5, .8, .9))
tt=2
densdraws_t = densdraws[,tt]
employdraws_t = employdraws[,tt]
selecteddraws_t = densdraws_t[employdraws_t ==1]
percentiles_mat[tt,] = quantile(selecteddraws_t, c(.1, .2, .5, .8, .9))
densdraws_t = densdraws[,tt]
employdraws_t = employdraws[,tt]
selecteddraws_t = densdraws_t[employdraws_t ==1]
quantile(selecteddraws_t, c(.1, .2, .5, .8, .9))
